package com.itheima.service.impl;

import com.itheima.entity.Result;
import com.itheima.mapper.GameMapper;
import com.itheima.pojo.Game;
import com.itheima.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ChaunceyZhang
 * @date 2022-10-21 21:04
 * @blog1 https://zephyr-cyber.github.io/
 * @blog2 https://www.yuque.com/gougougou-xwscx
 */
@Service
public class GameServiceImpl implements GameService {

    @Autowired
    private GameMapper gameMapper;


    @Override
    public List<Game> findAll() {
        List<Game> gameServiceAll = gameMapper.findAll();
        return gameServiceAll;
    }

    @Override
    public Boolean save(Game game) {
        Boolean save = gameMapper.save(game);
        return save;
    }

    @Override
    public Boolean update(Game game) {
        Boolean update = gameMapper.update(game);
        return update;
    }

    @Override
    public Boolean delete(Integer id) {
        Boolean delete = gameMapper.delete(id);
        return delete;
    }

}
